/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Server.BUS;

import Server.DAO.PhieuDatTiec_DAO;
import DTO.PhieuDatTiec_DTO;
import java.util.ArrayList;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author PEKEM
 */
public class PhieuDatTiec_BUS {

    public static ArrayList<PhieuDatTiec_DTO> layDSPhieuDatTiec() throws Exception {
        return PhieuDatTiec_DAO.layDSPhieuDatTiec();
    }

    public static DefaultTableModel layBangPhieuDat() throws Exception {
        return PhieuDatTiec_DAO.layBangPhieuDat();
    }

    public static int Insert(PhieuDatTiec_DTO pdt) throws Exception {
        return PhieuDatTiec_DAO.Insert(pdt);
    }

    public static int Delete(String maPhieuDatTiec) throws Exception {
        return PhieuDatTiec_DAO.Delete(maPhieuDatTiec);
    }

    public static int Update(PhieuDatTiec_DTO pdt) throws Exception {
        return PhieuDatTiec_DAO.Update(pdt);
    }

    public static String taoMaTuDong(String maGoc, int batDau) throws Exception {
        return PhieuDatTiec_DAO.taoMaTuDong(maGoc, batDau);
    }

    public static String layMaCuoiCung() throws Exception {
        return PhieuDatTiec_DAO.layMaCuoiCung();
    }
    public static float layTriGiaTheoMaKhach(String maKhach) throws Exception{
        return PhieuDatTiec_DAO.layTriGiaTheoMaKhach(maKhach);
    }
    public static int DeleteCTPhieuDatTiec(String maPhieuDatTiec) throws Exception {
        return PhieuDatTiec_DAO.DeleteCTPhieuDatTiec(maPhieuDatTiec);
    }
}
